<?php
if(!defined('ADMIN')){
	exit('Access Denied');
}

$id=empty($_GET['id'])?0:(int)$_GET['id'];

if(empty($id)){
    
    error_html("没有找到订单！","","");
}

$orderinfo=$ezhand->select("shopping3_order",'*','id="'.$id.'"');
//pp($orderinfo);
$result=$ezhand->select_all('fans','*','grade=1');
//var_dump($result);
//if(!empty($_SESSION['EZ_Admin']['shop_id'])&&$_SESSION['EZ_Admin']['shop_id']>0){
if($orderinfo['status']==1 && $orderinfo['is_given']==1){
    
   $result_list=array(""=>"选择厨师");
   if(!empty($result)){
      foreach($result as $val){
          if(!empty($val['realname'])){
            $result_list[$val['id']]=$val['realname'];
          }elseif(!empty($val['nickname'])){
             $result_list[$val['id']]=$val['nickname'];; 
          }
        }
        

      } 

    
  
}
if(empty($orderinfo)){
  error_html("没有找到订单！","","");  
}
$chefname=$ezhand->get_namebyid('shopping3_chef',"id=".$orderinfo['shop_id']."");
$goodsinfo=$ezhand->select_all("shopping3_order_goods o,shopping3_goods g","o.total,o.price,g.pcate,g.title,g.goodssn,g.thumb","o.goodsid=g.id and o.orderid=".$id);
$catlisttemp=$ezhand->get_cattree2(0,"shopping3_category");
$token=md5(EZKEY.$id.$_SESSION['EZ_Admin']['id']);
?>